﻿using System;
using System.Collections.Generic;
using System.Text;
using DAL;
using System.Data;

namespace BLL
{
    public class UsersManage
    {
        /// <summary>
        /// 用户登陆验证
        /// </summary>
        /// <param name="username"></param>
        /// <param name="pwd"></param>
        /// <returns></returns>
        public static bool UserLogin(string username, string pwd,bool isTeacher)
        {
            return UsersService.UserLogin(username,pwd,isTeacher);
        }

        public static Model.Users SelectByID(int id)
        {
            return UsersService.SelectByID(id);
        }

        public static Model.Users SelectByUsername(string username)
        {
            return UsersService.SelectByUsername(username);
        }
        /// <summary>
		/// 增加一条数据
		/// </summary>
        public static int Add(Model.Users model)
        {
            return UsersService.Add(model);
        }
        /// <summary>
		/// 更新一条数据
		/// </summary>
        public static bool Update(Model.Users model)
        {
            return UsersService.Update(model);
        }
        /// <summary>
		/// 删除一条数据
		/// </summary>
        public static void Delete(int id)
        {
            UsersService.Delete(id);
        }
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public static DataSet GetList(string strWhere = "")
        {
            return UsersService.GetList(strWhere);
        }
    }
}
